package com.softeem;

/**
 * @author xiyu
 * @version 1.0
 * @date 2025/4/1 11:06
 * @description  try中有return，finally中也有return
 * return
 */
public class demo3 {
    public int m(){
        int i = 0;
        try {
            i++;
            System.out.println("try中i = "+i);
            return i;
        }catch (Exception e){
            e.printStackTrace();
        }finally {
            i++;
            System.out.println("finally中i = "+i);
            return i;
        }
    }

    public static void main(String[] args) {
        demo3 d = new demo3();
        int v = d.m();
        System.out.println("v = " + v);
    }
}
